#include "log/Log.h"
#include "log/Logger.h"
#include "log/LogAppender.h"
#include "log/LoggerManager.h"

using namespace std;
using namespace log;

static log::Logger::ptr g_logger = GET_LOGGER_BY_NAME("debug");

void test()
{
    LOG_INFO(g_logger) << "abc";
    LOG_ERROR(g_logger) << "123";
    LOG_FMT_INFO(g_logger, "fmt %d", 123);
    LOG_FMT_ERROR(g_logger, "fmt %d", 123);

    LOG_INFO(g_sysLogger) << "abc";
    LOG_ERROR(g_sysLogger) << "123";
    LOG_FMT_INFO(g_sysLogger, "fmt %d", 123);
    LOG_FMT_ERROR(g_sysLogger, "fmt %d", 123);
}

void test2()
{
    SYS_ERROR() << "123";
}

int main(int argc, char const *argv[])
{
    log::LoggerManager::instance()->init("./config/log.json");
    //test(); 
    test2();
    return 0;
}

